Convert a Wiring Diagram to PLC Program